<div class="col-sm-12 search-collapse">
    <form id="role-form">
        <input type="hidden" name="fund_type" value="<?=$input['fund_type']??''?>">
        <div class="select-list">
            <ul>
                <li class="select-time">
                    <label>申请时间： </label>
                    <?= \common\widgets\FormInput::widget(['name'=>'input','extend'=>['name'=>'between[create_time][start]','id'=>'startTime','place'=>'开始时间']])?>
                    <span>-</span>
                    <?= \common\widgets\FormInput::widget(['name'=>'input','extend'=>['name'=>'between[create_time][end]','id'=>'endTime','place'=>'结束时间']])?>
                </li>
                <li><?= \common\widgets\FormInput::widget(['name'=>'select|状态','extend'=>['name'=>'where[review_status]','value'=>'','place'=>'所有','data'=>$this->params['review_status']]])?></li>
                <li>
                    <?= $this->render('/iframe',['name'=>'searchbtn|搜索'])?>
                    <?= $this->render('/iframe',['name'=>'resetbtn|重置'])?>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="col-sm-12 select-table table-striped">
    <table id="bootstrap-table"></table>
</div>

<?php $this->beginBlock('script'); ?>
<script>
    $(function () {
        var fund_type = "<?=$input['fund_type']?>";
        var columns = [];
        if (fund_type==3){
            var columns = [
                {field: 'campus_name', title: '校区'},
                {field: 'user_html', title: '收款人'},
                {field: 'amount', title: '提现金额'},
                {field: 'fee', title: '手续费'},
                {field: 'payment_amount', title: '打款金额'},
                {field: 'way_title', title: '提现方式'},
                {field: 'review_status_title', title: '审核状态'},
                {field: 'review_time', title: '审核时间'},
                {field: 'review_remarks', title: '审核备注'},
                {field: 'create_time', title: '申请时间'},
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var html = '';
                        if (row.review_status==0){
                            html = '<?=$this->render("/iframe",["name"=>"formopbtn","extend"=>["type"=>["review"],"rowId"=>"row.id"]])?>';
                        }
                        return html;
                    }
                }
            ]
        }else {
            var columns = [
                {field: 'user_html', title: '申请人'},
                {field: 'amount', title: '提现金额'},
                {field: 'fee', title: '手续费'},
                {field: 'payment_amount', title: '打款金额'},
                {field: 'way_title', title: '提现方式'},
                {field: 'review_status_title', title: '审核状态'},
                {field: 'review_time', title: '审核时间'},
                {field: 'review_remarks', title: '审核备注'},
                {field: 'create_time', title: '申请时间'},
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var html = '';
                        if (row.review_status==0){
                            html = '<?=$this->render("/iframe",["name"=>"formopbtn","extend"=>["type"=>["review"],"rowId"=>"row.id"]])?>';
                        }
                        return html;
                    }
                }
            ]
        }
        var options = {
            modalName: "提现",
            sortName:'create_time',
            sortOrder: "desc",
            columns: columns
        };
        $.table.init(options);
    });
    function detail_mine(id) {
        var url = "<?=\yii\helpers\Url::toRoute('water')?>";
        url=urlcreate(url,'userid=' + id);
        $.operate.detail("",null,null, url);
    }
</script>
<?php $this->endBlock(); ?>

